package geekzpacho.examples.ehcache;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity
@Table(name = "VEHICLES")
public class Vehicle implements Serializable {
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -4295164392260587011L;

	public Vehicle() {
		super();
	}
	
	/**
	 * Id
	 */
	@Id
	@Column(name = "IDVEHICLE")
	private Integer id;
	
	/**
	 * Name
	 */
	@Column(name = "NAME", nullable = false, length = 45)
	private String name;
	
	/**
	 * Name
	 */
	@Column(name = "DESCRIPTION", length = 150)
	private String description;
	
	/**
	 * Constructor
	 * @param id
	 * @param name
	 * @param description
	 */
	public Vehicle(Integer id, String name, String description) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
	}
	 
	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public String toString() {
		return "Vehicle [id=" + this.id + ", name=" + this.name + ", description=" + this.description + "]";
	}
	
	
	
}